
def filter_new_bond(ali):
    # 去掉新债
    return ali.loc[ali['price_tips'] != '待上市']


def filter_eb_bond(ali):
    # 去掉EB债
    return ali.loc[ali['是否为EB'] != 'E']


def filter_redeem_bond(ali):
    # 去掉强赎债
    return ali.loc[(ali['强赎图标'] != 'R') & (ali['强赎图标'] != 'O')]


def filter_st_bond(ali):
    return ali.loc[~ali['stock_nm'].str.contains('ST')]


def filter_base(ali):
    ali = ali.loc[ali['price_tips'] != '待上市']
    ali = ali.loc[ali['btype'] != 'E']
    ali = ali.loc[(ali['redeem_icon'] != 'R') & (ali['redeem_icon'] != 'O')]
    return ali
